// 登录和注册的接口
import axio from "@/API/axios/axios";
// 用户信息类型
export interface User {
    userId?: number;
    username?: string;
    password: string;
    realName?: string;
    phone?: string;
    code?:string;
    userType?: 'admin' | 'staff';
    staffNo?: string;
}

//发送验证码api
export function sendCodeApi(phone: string){
    return axio.get(`/user/sendCode/${phone}`)
}
//注册功能api
export function registerApi(user: User){
    return axio.post('/user/register',user)
}

// 登录功能api
export function loginApi(user: User){
    return axio.post('/user/login',user)
}